package io.renren.modules.app.controller;


import io.renren.common.result.Result;
import io.renren.modules.medical.service.IllSubService;
import io.renren.modules.medical.vo.medicalVo.IllSubTitleAndIdVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 微信端病情分类的接口
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-04-17 11:41
 */
@RestController
@RequestMapping("/app/illSub")
@RequiredArgsConstructor
public class IllSubApi {

    private final IllSubService illSubService;

    /**
     * 获取所有父病情分类集合
     * @return
     */
    @GetMapping("/getOneLevel")
    public Result<List<IllSubTitleAndIdVo>> getOneLevel(){
        List<IllSubTitleAndIdVo> list = illSubService.getOneLevelList();
        return Result.success(list);
    }

}
